#define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable:6031)

#include <stdio.h>

int* printNumbers(int n, int* returnSize)
{
    // write code here
    int arr[99999] = { 1,2,3,4,5,6,7,8,9 };
    int* ret = arr;
    int num = 1;
    int i = 0;

    for (i = 0; i < n; i++)
    {
        num = num * 10;
    }

    *returnSize = num - 1;

    for (i = 1; i < num; i++)
    {
        arr[i - 1] = i;
    }

    return ret;
}

int main()
{
    int n = 1;
    int* num = 0;
    int i = 0;

    int* a = printNumbers(n, num);

    for (i = 0; i < *num; i++)
    {
        printf("%d ", *(a + i));
    }

    return 0;
}